Social network analysis

Pablo Barberá
January 22, 2016

picture1
Moreno, Who Shall Survive?, 1934

picture1
Moreno, Who Shall Survive?, 1934

picture1
Moreno, Who Shall Survive?, 1934

picture1
Moreno, Who Shall Survive?, 1934

picture1 Christakis & Fowler, NEJM, 2007

picture1 Adamic & Glance, 2004, IWLD

picture1
Barberá et al, 2015, Psychological Science

Outline

Social network analysis:

  • Basic concepts
  • Importing network data into R
  • Network visualization
  • Node and network-level summary statistics
  • Community detection
  • Network modeling

Basic concepts

Node (vertex): each of the objects in the graph

Edge (tie): each of the connections between nodes.

Two types of edges:

  • Undirected: symmetric connection, represented by lines.
  • Directed: imply direction, represented by arrows.

A graph consists of a set of nodes and edges.

A few examples

  • Classroom: students / friendships
  • Twitter: users / retweets
  • Academic literature: papers / citations
  • Internet: websites / hyperlinks
  • Trade: countries / trade flows
  • Biology: neurons / connections

Network visualization:

plot of chunk unnamed-chunk-1

Adjacency matrix:

         Jennifer Pablo Dan Kevin Denis
Jennifer        0     1   1     0     0
Pablo           1     0   0     1     1
Dan             1     0   0     1     0
Kevin           0     1   1     0     1
Denis           0     1   0     1     0

Edgelist:

     Node1      Node2  
[1,] "Jennifer" "Pablo"
[2,] "Jennifer" "Dan"  
[3,] "Pablo"    "Kevin"
[4,] "Pablo"    "Denis"
[5,] "Kevin"    "Denis"
[6,] "Dan"      "Kevin"